;(function($){
	$selectUser = {
		init:function(){
			$('#selectUserForm').find('#submitMul').click(function(){
				var $options = $('#select2 option');
				var all="";
				$options.each(function() {
				    all += $(this).attr("value")+",";
				});
				$('#mulIds').val(all);
				$(this).submit();
			});
			
			$('#selectUserForm').find('#select2').dblclick(function(){
				$('#select2 option:selected').remove();
			});
	
			$('#selectUserForm').find('#removeAll').click(function(){
				var $options = $('#select2 option');
				$options.remove();
			});
		},
		select: function(id,name){
			$("#selectUserForm").find("#select2 option[value='"+id+"']").remove(); 
			$("#selectUserForm").find("#select2").prepend("<option value='"+id+"'>"+name+"</option>"); 
		}
  };
})(jQuery)